JavaScript
DategetDayOfYear Method
Syntax
Date.getDayOfYear()
Returns
- daynumber
The day of the year.
Description
Extension to the native date variable to the get the day of the year of a given date.
Example
var d = new Date(2018,7,10); var doy = d.getDayOfYear(); // doy = 221